import request from "../utils/request.js"

export function test(data) {
	return request({
		url: "/Notice/NoticeList",
		data
	})
}

//注册验证码
export function SendCode(data) {
	return request({
		url: "/Open/SendCode",
		method: 'post',
		data
	})
}

//登录
export function Login(data) {
	return request({
		url: "/Open/Login",
		method: 'post',
		data
	})
}

// 注册
export function Register(data) {
	return request({
		url: "/Open/Register",
		method: 'post',
		data
	})
}

//首页产品
export function IndexGoods() {
	return request({
		url: "/Index/Index",
	})
}

//产品列表
export function GoodsList() {
	return request({
		url: "/Goods/BaoList",
	})
}

//搜索产品列表
export function GoodsSearch(data) {
	return request({
		url: "/Goods/GoodsSearch",
		method: 'post',
		data
	})
}

export function getKey(data) {
	return request({
		url: "/Open/getSessionKey",
		data
	})
}

export function KListMore(data) {
	return request({
		url: "/index/KListMore",
		data
	})
}

export function UserInfo() {
	return request({
		url: "/User/Index"
	})
}


// 健康科普
export function KList() {
	return request({
		url: "/Index/KList"
	})
}

// 健康科普详情
export function KDetail(data) {
	return request({
		url: "/Index/KDetail",
		method: 'post',
		data
	})
}

// 视频
export function Video(data) {
	return request({
		url: "/Index/Video",
		data
	})
}


// 视频详情
export function VideoDetail(data) {
	return request({
		url: "/Index/VideoDetail",
		method: 'post',
		data
	})
}

// 列表
export function ClassList() {
	return request({
		url: "/Goods/ClassList"
	})
}

// 商品详情
export function GoodsDetail(data) {
	return request({
		url: "/Goods/GoodsDetail",
		data
	})
}

// 提交订单
export function OrderFound(data) {
	return request({
		url: "/Order/OrderFound",
		data
	})
}

// 城市列表
export function CityList(data) {
	return request({
		url: "/User/CityList",
		data
	})
}

//新增地址
export function address_add(data) {
	return request({
		url: "/User/AddressAdd",
		method: 'post',
		data
	})
}

//地址列表
export function AddressList() {
	return request({
		url: "/User/AddressList",
	})
}

// 删除地址
export function AddressDelete(data) {
	return request({
		url: "/User/AddressDelete",
		method: 'post',
		data
	})
}

//设置默认地址
export function AddressDefault(data) {
	return request({
		url: "/User/AddressDefault",
		method: 'post',
		data
	})
}

// 公告列表
export function NoticeList() {
	return request({
		url: "/Notice/NoticeList"
	})
}

// 公告详情
export function NoticeDetail(data) {
	return request({
		url: "/Notice/NoticeDetail",
		data
	})
}

// 关于我们
export function About() {
	return request({
		url: "/Notice/About"
	})
}

// 订单列表
export function OrderList() {
	return request({
		url: "/Order/OrderList"
	})
}

// 提交订单
export function CreateOrder(data) {
	return request({
		url: "/Order/CreateOrder",
		method: 'post',
		data
	})
}

// 购物车
export function AddCart(data) {
	return request({
		url: "/Order/AddCart",
		method: 'post',
		data
	})
}

// 购物车列表
export function UserCart(data) {
	return request({
		url: "/Order/UserCart",
		data
	})
}
// 购物车
export function UpdateCart(data) {
	return request({
		url: "/Order/UpdateCart",
		method: 'post',
		data
	})
}

// 确认收货
export function OrderSure(data) {
	return request({
		url: "/Order/OrderSure",
		method: 'post',
		data
	})
}

// 支付订单
export function OrderPay(data) {
	return request({
		url: "/Order/OrderPay",
		data
	})
}

//提交支付订单
export function OrderSub(data) {
	return request({
		url: "/Order/OrderPay",
		method: 'post',
		data
	})
}

//取消订单
export function CancelOrder(data) {
	return request({
		url: "/Order/CancelOrder",
		method: 'post',
		data
	})
}

// 提现
export function UserWithdraw(data) {
	return request({
		url: "/User/UserWithdraw",
		method: 'post',
		data
	})
}
// 提现记录
export function UserWithdrawList() {
	return request({
		url: "/User/UserWithdraw"
	})
}

// 提现银行
export function UserBank(data) {
	return request({
		url: "/User/UserBank",
		data
	})
}

// 提现银行信息
export function GetUserBank(data) {
	return request({
		url: "/User/UserBank",
		method: 'post',
		data
	})
}

// 充值信息
export function GetRecharge(data) {
	return request({
		url: "/Finance/Recharge",
		data
	})
}

// 充值
export function Recharge(data) {
	return request({
		url: "/Finance/Recharge",
		method: 'post',
		data
	})
}

// 充值信息
export function FinanceList(data) {
	return request({
		url: "/Finance/FinanceList",
		data
	})
}

// 购物车(删除)
export function DelCart(data) {
	return request({
		url: "/Order/DelCart",
		method: 'post',
		data
	})
}